using System;
using System.Collections.Generic;
using System.Text;
using Dominio;
using DAP;

namespace Presenters
{
    public class ReleaseDetailsPresenter
    {
        private ReleaseRepository repository;

        public ReleaseDetailsPresenter()
        {
            repository = new ReleaseRepository();
        }

        public Release getReleaseById(int Id)
        {
            return repository.getReleaseById(Id);
        }

        public void updateRelease(int releaseId, String closeDate, String creationDate, String description, String version, String url, TestingManager tm)
        {
            Release release = new Release(releaseId, closeDate, creationDate, description, version, url, tm);
            repository.SaveRelease(release);
        }
        public void createRelease(String closeDate, String creationDate, String description, String version, String url, TestingManager tm)
        {
            Release release = new Release(closeDate, creationDate, description, version, url, tm);
            repository.SaveRelease(release);
        }
    }
}
